package o;

import androidx.annotation.NonNull;
import java.nio.ByteBuffer;
import java.security.MessageDigest;

final class tu implements sa {
    private static final aar<Class<?>, byte[]> ॱ = new aar(50);
    private final sa sourceKey;
    private final sc ʻ;
    private final si<?> ʼ;
    private final int ˊ;
    private final sa ˋ;
    private final ud ˎ;
    private final int ॱॱ;
    private final Class<?> ᐝ;

    tu(ud udVar, sa saVar, sa saVar2, int i, int i2, si<?> siVar, Class<?> cls, sc scVar) {
        this.ˎ = udVar;
        this.sourceKey = saVar;
        this.ˋ = saVar2;
        this.ˊ = i;
        this.ॱॱ = i2;
        this.ʼ = siVar;
        this.ᐝ = cls;
        this.ʻ = scVar;
    }

    public boolean equals(Object obj) {
        if (!(obj instanceof tu)) {
            return false;
        }
        tu tuVar = (tu) obj;
        if (this.ॱॱ == tuVar.ॱॱ && this.ˊ == tuVar.ˊ && aau.ॱ(this.ʼ, tuVar.ʼ) && this.ᐝ.equals(tuVar.ᐝ) && this.sourceKey.equals(tuVar.sourceKey) && this.ˋ.equals(tuVar.ˋ) && this.ʻ.equals(tuVar.ʻ)) {
            return true;
        }
        return false;
    }

    public int hashCode() {
        int hashCode = (((((this.sourceKey.hashCode() * 31) + this.ˋ.hashCode()) * 31) + this.ˊ) * 31) + this.ॱॱ;
        if (this.ʼ != null) {
            hashCode = (hashCode * 31) + this.ʼ.hashCode();
        }
        return (((hashCode * 31) + this.ᐝ.hashCode()) * 31) + this.ʻ.hashCode();
    }

    public void ॱ(@NonNull MessageDigest messageDigest) {
        byte[] bArr = (byte[]) this.ˎ.ˊ(8, byte[].class);
        ByteBuffer.wrap(bArr).putInt(this.ˊ).putInt(this.ॱॱ).array();
        this.ˋ.ॱ(messageDigest);
        this.sourceKey.ॱ(messageDigest);
        messageDigest.update(bArr);
        if (this.ʼ != null) {
            this.ʼ.ॱ(messageDigest);
        }
        this.ʻ.ॱ(messageDigest);
        messageDigest.update(ˎ());
        this.ˎ.ˊ(bArr);
    }

    private byte[] ˎ() {
        byte[] bArr = (byte[]) ॱ.ˏ(this.ᐝ);
        if (bArr != null) {
            return bArr;
        }
        Object bytes = this.ᐝ.getName().getBytes(ˏ);
        ॱ.ˊ(this.ᐝ, bytes);
        return bytes;
    }

    public String toString() {
        return "ResourceCacheKey{sourceKey=" + this.sourceKey + ", signature=" + this.ˋ + ", width=" + this.ˊ + ", height=" + this.ॱॱ + ", decodedResourceClass=" + this.ᐝ + ", transformation='" + this.ʼ + '\'' + ", options=" + this.ʻ + '}';
    }
}
